import { FC } from 'react';
import styles from './index.module.less';

interface TabProps {
  options: string[];
  activeTab: string;
  onChange: (tab: string) => void;
}

const Tab: FC<TabProps> = ({ options, activeTab, onChange }) => {
  return (
    <div className={styles.tabContainer}>
      {options.map(tab => (
        <button
          key={tab}
          className={`${styles.tabButton} ${activeTab === tab ? styles.active : ''}`}
          onClick={() => onChange(tab)}
        >
          {tab}
        </button>
      ))}
    </div>
  );
};

export default Tab; 